$(function () {
    Mdeure();
})
function Mdeure() {
    $("#MdeTable").bootstrapTable({
        //请求方式  get请求中文会乱码，建议使用post请求
        method: 'post',
        //请求头部的设置
        contentType: 'application/json',
        //url
        url: '/Mdesignprocedure.do/LiMengMdesignprocedureSH',
        //设置交替行样式
        striped: true,
        //初始显示页号
        pageNumber: 1,
        //设置表格高度
        //height: 350,
        //是否显示分页
        pagination: true,
        //设置是服务端分页还是客户端分页
        sidePagination: 'server',
        //页大小
        pageSize: 5,
        //分页列表
        pageList: [3, 5, 6, 10],
        queryParams: function (params) {
            return {
                num: params.offset / params.limit + 1,
                size: params.limit
            }
        },
        //上传到服务端的参数
        columns: [
            {title: "设计单编号", field: "designid", align: 'center'},
            {title: "产品编号", field: "productid", align: 'center'},
            {title: "产品名称", field: "productname", align: 'center'},
            {title: "设计人", field: "designer", align: 'center'},
            {title: "登记时间", field: "registertime", align: 'center'},
            {title: "工时总成本", field: "costpricesum", align: 'center'},
            {
                title: "审核", field: "responsibleperson", align: 'center',
                formatter: function (vale, row, index) {
                    let Mde = JSON.stringify(row)
                    let del_btn = "<button class='btn btn-danger' onclick='ShenHe(" + Mde + ")'>审核</button>";
                    return del_btn;
                }
            },
        ]
    })
}

function ShenHe(BG) {
    localStorage.setItem("mdesignprocedureKaiShiSH",JSON.stringify(BG));
    location.href="../../li_meng/mdesignprocedureKaiShiSH.html";
}